<template>
  <div>
      <p>{{msg|handleStr}}</p>
      <Item>
          <p slot="icon">前面</p>
      </Item>
  </div>
</template>

<script>
import Item from './components/Item.vue'
export default {
    data() {
        return {
            msg:"你妈叫你回家吃饭"
        }
    },
    filters:{
        handleStr(val){
            console.log(val);
            if(val.length>3){
                val = val.slice(0,3)+'...'
            }
            return val;
        }
    },
    components:{
        Item
    }
}
</script>

<style>

</style>